//
//  GYLogger.h
//  GYLogger
//
//  Created by APPLE on 2020/6/23.
//  Copyright © 2020 APPLE. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <DDLog.h>
@class DDOSLogger;
@class DDFileLogger;
@class DDTTYLogger;


NS_ASSUME_NONNULL_BEGIN

@interface GYLogger : NSObject

+ (instancetype) shareInstance;

/// 控制台日志(ios系统大于10.0，使用OSLogger,否则使用TTYLogger)
@property (nonatomic, strong, readonly) DDOSLogger * OSLogger;

/**
 * 文件日志，默认为nil,需要手动初始化，eg：
 *  NSString *documentsDirectory = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
 *  DDLogFileManagerDefault* logFileManager = [[DDLogFileManagerDefault alloc] initWithLogsDirectory:documentsDirectory];
 *  DDFileLogger *fileLogger = [[DDFileLogger alloc] initWithLogFileManager:logFileManager];
 *  fileLogger.rollingFrequency = 60 * 60 * 24 * 7; // 1 week rolling
 *  fileLogger.logFileManager.maximumNumberOfLogFiles = 7;
 *  [GYLogger shareInstance].filelogger = fileLogger;
 */
@property (nonatomic, strong) DDFileLogger * filelogger;

/// 控制台日志(ios系统大于10.0，使用OSLogger,否则使用TTYLogger)
@property (nonatomic, strong, readonly) DDTTYLogger * TTYLogger;

@property (nonatomic, assign, getter=isSimpleFormate) BOOL simpleFormate;

@property (nonatomic, assign) DDLogLevel level;
@end

NS_ASSUME_NONNULL_END
